package com.hbsoft.util;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;


public class SqlConfig
{
	private static SqlConfig rcf;
	private String selectUserInfoSql = null;
	private String kindInfoSql = null;
	private String colorInfoSql = null;
	private String priceInfoSql = null;
	private String specInfoSql = null;
	
	public static SqlConfig getInstance(){
		if(rcf==null){
			rcf = new SqlConfig();
		}
		return rcf;
	}
	
	public SqlConfig(){
		Properties p = new Properties();
		try {
			p.load(this.getClass().getResourceAsStream("sql.properties"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		selectUserInfoSql = p.getProperty("selectUserInfoSql");
		kindInfoSql = p.getProperty("kindInfoSql");
		colorInfoSql = p.getProperty("colorInfoSql");
		priceInfoSql = p.getProperty("priceInfoSql");
		specInfoSql = p.getProperty("specInfoSql");
	}
	
	public String getSelectUserInfoSql() {
		return selectUserInfoSql;
	}

	public String getColorInfoSql() {
		return colorInfoSql;
	}

	public String getKindInfoSql() {
		return kindInfoSql;
	}

	public String getPriceInfoSql() {
		return priceInfoSql;
	}

	public String getSpecInfoSql() {
		return specInfoSql;
	}
	
	
}
